package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IWorkerCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 服务端 - 服务认证相关接口
 * @Author:篍
 * @Date: 2025/09/17 11:20
 * @Description:
 */
@RestController
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 服务认证相关接口")
public class WorkerCertificationAuditController {

    @Resource
    private IWorkerCertificationAuditService workerCertificationAuditService;

    @PostMapping
    @ApiOperation("服务端提交认证")
    public void certification(@RequestBody WorkerCertificationAuditAddReqDTO workerCertificationAuditAddReqDTO) {
         workerCertificationAuditService.certification(workerCertificationAuditAddReqDTO);
    }

    @GetMapping("/rejectReason")
    @ApiOperation("查询最新驳回原因")
    public RejectReasonResDTO getRejectReason() {
        return workerCertificationAuditService.getRejectReason();
    }
}
